﻿<Window x:Class="Onvif_IP_Camera_Manager.View.OnlineStream"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:converters="clr-namespace:Onvif_IP_Camera_Manager.View.Converters"
        Icon="/Onvif IP Camera Manager;component/Resources/ip_camera_sdk_icon_transparent_128x128.png"
        DataContext="{Binding RelativeSource={RelativeSource Self}}"
        Title="Online Stream Client" Height="350" Width="300" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen">
   <Window.Resources>
        <converters:ClientConverter x:Key="ClientConverter" />
   </Window.Resources>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Label HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Content="Online"/>
                <Label HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Content="{Binding MediaGateway.ConnectedClients.Count}"/>
            </Grid>
            <ListBox Grid.Row="1" ItemsSource="{Binding MediaGateway.ConnectedClients, Converter={StaticResource ClientConverter}}" />
            <Button Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Close" Width="50" IsCancel="True" Click="CloseButton" />
        </Grid>
   
</Window>
